README file for "Unbundling Quantitative Easing: Taking a Cue from Treasury Auctions" Dataverse replication page
Date: September 24, 2023

This readme file documents the replication source files in "tauctionx_dataverse.zip" which produce the tables and figures in the published paper and online appendices

Folder structure:
main_tauctionx_dataverse.sh: shell file for fully replicating all tables and figures

All code for processing and analyzing the data is located in "tauctionx_dataverse/empirical_analysis"

All code for estimating and analyzing New Keynesian Preferred Habitat (NKPH) models is located in "tauctionx_dataverse/model_nkph"


################################################################################
Software requirements:

The empirical analysis requires Stata. Additional data scraping and table processing requires Python. The model analysis requires Julia. The main shell script requires Zsh. The code has been tested on a 2021 Macbook Pro (Apple M1 Max) running macOS Ventura 13.3, using the following software versions:

StataSE 17.0
Python 3.10.12
Julia 1.7.2 
zsh 5.9


In addition, a number of code packages are required:
Python: required packages are described in the file tauctionx.yml (and downloaded through the package manager conda, available here https://anaconda.org/anaconda/conda)
Julia: required packages are described in the files Manifest.toml and Project.toml
Stata: required packages are described at the top of the file main_empirical.do




################################################################################
tauctionx_dataverse/empirical_analysis details:

./do
Main Stata code which creates all figures and tables in the published paper and online appendices.

main_empirical.do: main do file for processing data and running the main empirical analyses from Section 3
main_model.do: main do file for creating the figures and tables from Section 4. The model data is produced in tauctionx_dataverse/model_nkph (described below)

Each of these main do files calls a number of different do and ado files, which are also included in this directory. The Python script tauctionx_process_tex_tables.py in this directory compiles the tex files into the form used for producing the tables in the paper.



./figs
./tables
Figures and tables created by the do files described above. Naming convention: each figure or table starts with fXX_ or tXX_, where XX denotes the step do file which produced the figure. For example, "f2e_longdiff_coeffs" is produced in the do file "step2e_longdiff_regressions.do". Tables which end in the name "_pyedit" are produced from the Python code tauctionx_process_tex_tables.


./data
Cleaned data and data analysis files, produced by the do files described above


./data/input
Input data from various sources, as described in the paper.
Note: our shock series are included here, which are based on proprietary data sources. This replication package does not include the raw data which is used to create our shock series. The Online Appendix describes how to access these proprietary datasets. 


./py
Python code for scraping and cleaning TreasuryDirect and other auction data



################################################################################
tauctionx_dataverse/model_nkph details:

./bin
Main Julia files for estimating the model and running experiments. Options are passed from the command line, described in the top of each file (also see the options passed in main_tauctionx_dataverse.sh)

estimate_nkph_continuation.jl: Julia file which estimates the parameters of the chosen NKPH model
summarize_estimates_experiments.jl: Julia file which summarizes the baseline model estimates, and runs policy experiments


./src
Julia source code files for solving and estimating NKPH models (see the Online Appendix for description of the algorithm)


./models
Excel files which describe different NKPH models (and which are parsed by the Julia source files). Model estimates are saved in excel files in the subfolder ./models/estimates


./targets
Target moments used in the estimation of the model (produced by the code in empirical_analysis)


./output
Excel files which contain the results of the policy experiments conducted in summarize_estimates_experiments.jl


The files Manifest.toml and Project.toml include information about dependencies, versions, and package names for the Julia code described above.





